Crate histogram

source ·
Expand description

This crate provides histogram implementations that are conceptually similar to HdrHistogram, with modifications to the bucket construction and indexing algorithms that we believe provide a simpler implementation and more efficient runtime compared to the reference implementation of HdrHistogram.

§Goals

  • simple implementation
  • fine-grained configuration
  • efficient runtime

§Background

Please see: https://observablehq.com/@iopsystems/h2histogram

Structs§

  • A histogram that uses atomic 64bit counters for each bucket.
  • A bucket represents a quantized range of values and a count of observations that fall into that range.
  • The configuration of a histogram which determines the bucketing strategy and therefore the relative error and memory utilization of a histogram.
  • A histogram that uses plain 64bit counters for each bucket.
  • A snapshot of a histogram across a time range.
  • This histogram is a sparse, columnar representation of the regular Histogram. It is significantly smaller than a regular Histogram when a large number of buckets are zero, which is a frequent occurence. It stores an individual vector for each field of non-zero buckets. Assuming index[0] = n, (index[0], count[0]) corresponds to the nth bucket.

Enums§

  • Errors returned for histogram construction and operations.